// 默认配置了一些全局的getters 方便访问
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username, // 用户名字的获取
  staffPhoto: state => state.user.userInfo.staffPhoto, // 用户头像的映射
  routes: state => state.permission.routes, // 导出当前的路由，可以全局使用
  roles: state => state.user.userInfo.roles

}
export default getters
